task :start do
    system 'scrapy crawl LinkedinSpider'
end


task :start_with_resume, :job_name do |t, args|
    if !File.exists?("crawl_jobs")
        FileUtil.mkdir("crawl_jobs")
    end
    system "scrapy crawl LinkedinSpider -s JOBDIR=crawl_jobs/#{args.job_name}"
end

task :reload_proxy do
    system 'python reload_proxy.py'
end
